#define  _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
class Date
{
public:
    Date(int year, int month, int day) :_year(year), _month(month), _day(day)
    {
    }
    int Getmonthday(int year, int month)
    {
        int mon[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
        if (month == 2 && ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)))
        {
            return 29;
        }
        return mon[month];
    }

    Date& operator+=(int day)
    {
        _day += day;
        while (_day > Getmonthday(_year, _month))
        {
            _day -= Getmonthday(_year, _month);
            _month++;
            if (_month == 13)
            {
                _year++;
                _month = 1;
            }
        }
        return *this;
    }

    Date(const Date& d)
    {
        _year = d._year;
        _month = d._month;
        _day = d._day;
    }
    bool operator==(const Date& d)
    {
        return _year == d._year
            && _month == d._month
            && _day == d._day;
    }
    bool operator<(const Date& d)
    {
        if (_year < d._year)
            return true;
        else if (_year == d._year)
        {
            if (_month < d._month)
                return true;
            else if (_month == d._month)
                if (_day < d._day)
                    return true;
        }
        return false;
    }
    int operator-(const Date& d)
    {
        int day = 0;
        int flag = 1;
        Date max = *this;
        Date min = d;
        if (max < min)
        {
            max = d;
            min = *this;
            flag = -1;
        }
        int count = 0;
        while (!(max == min))
        {
            min += 1;
            count++;
        }
        return count * flag;
    }

private:
    int _year;
    int _month;
    int _day;
};

int main() {
    int year, month, day;
    while (cin >> year >> month >> day)
    {
        Date d1(year, month, day);
        cin >> year >> month >> day;
        Date d2(year, month, day);
        int count = d1 - d2;
        cout << count;
    }
    return 0;
}